﻿using BrnMall.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrnMall.Core.Domain.Distribution;
using BrnMall.Data;

namespace BrnMall.Services
{
	/// <summary>
	/// 后台分销操作管理类
	/// </summary>
	public partial class AdminDistributionService : DistributionService
	{
		#region 分销参数设置

		/// <summary>
		/// 获取分销参数
		/// </summary>
		/// <returns></returns>
		public static DistributionParamInfo GetDistributionParam()
		{
			return DistributionData.GetDistributionParam();
		}
		/// <summary>
		/// 保存分销参数
		/// </summary>
		/// <param name="info"></param>
		public static void SaveDistributionParam(DistributionParamInfo info)
		{
			DistributionData.SaveDistributionParam(info);
		}

		#endregion

		#region 分销商品设置

		/// <summary>
		/// 获取分销商品设置信息列表
		/// </summary>
		/// <param name="pageSize">页大小</param>
		/// <param name="pageNumber">页号</param>
		/// <param name="condition">条件</param>
		/// <param name="sort">排序</param>
		/// <param name="total">总数</param>
		/// <returns></returns>
		public static List<DistributionProductSetListInfo> GetDistributionProductSetList(int pageSize, int pageNumber,
			string condition, string sort, out long total)
		{
			return DistributionData.GetDistributionProductSetList(pageSize, pageNumber, condition, sort, out total);
		}
		/// <summary>
		/// 保存分销商品设置信息
		/// </summary>
		/// <param name="info"></param>
		public static void SaveDistributionProductSet(DistributionProductSetInfo info)
		{
			DistributionData.SaveDistributionProductSet(info);
		}

		public static void DeleteDistributionProductSet(int id)
		{
			DistributionData.DeleteDistributionProductSet(id);
		}

		#endregion

		#region 分销商管理

		public static List<DistributorListInfo> GetDistributorList(int pageSize, int pageNumber, string condition, string sort,
			out long total)
		{
			return DistributionData.GetDistributorList(pageSize,pageNumber,condition,sort,out total);
		}

		#endregion
	}
}
